Japanese Laid-Open Patent Publication No. 2004-236799 (hereinafter, referred to as Patent Document 1) discloses that, when an object operated by a player goes around a curve, a movement speed of the object is corrected in accordance with a position of the object on the curve. For example, when the object is on an inner curve, the movement speed thereof is corrected so as to be increased. On the other hand, when the object is on an outer curve, the movement speed thereof is corrected so as to be reduced. Thus, when a speed at which the object approaches the curve is too high and therefore the object is likely to slide off the course at the curve, the movement speed thereof is automatically reduced. Consequently, the object is able to go around the curve without sliding off the course.
However, in the technique disclosed in Patent Document 1, the speed is corrected whereas a moving direction is never corrected.
Therefore, certain example embodiments provide a game program and a game apparatus capable of subsidiarily determining a moving direction of an object operated by a player.
Certain example embodiments have the following features to attain the object mentioned above. The reference numerals in the parentheses are provided to indicate an exemplary correspondence with the drawings in order to aid in understanding certain example embodiments and are not intended to limit, in any way, the scope of the present invention.
A computer-readable storage medium according to certain example embodiments has stored thereon a game program for moving a player object in a virtual game world in accordance with an operation performed by a player. The game program causes a computer (31) of a game apparatus (3) to function as follows:
display control means (S36) for displaying the player object on a screen of a display device (2);
advancing direction determination means (S18) for determining, by using data (43) used for determining an advancing direction of the player object set in the virtual game world, the advancing direction at a current position of the player object in the virtual game world, the advancing direction representing a direction in which the player object advances;
advance instruction detection means for detecting for an advance instruction inputted by the player using an input device (6) for advancing the player object; and
advancing movement control means (S20, S28, S30) for moving or accelerating, in accordance with the advance instruction from the player having been detected by the advance instruction detection means, the player object in the advancing direction having been determined by the advancing direction determination means.
Here, the “data used for determining an advancing direction” is predetermined data for determining, in the virtual game world, the advancing direction at one of positions or in one of areas in the virtual game world. The “data used for determining an advancing direction” may be direction data (direction vector) representing a direction in the virtual game world, a plural pieces of positional data representing a plurality of positions associated with each other in the virtual game world (in this case, the plurality of positions represented by the plural pieces of positional data are connected to each other so as to represent a direction), or a predetermined equation for determining the direction vector. Such data is set for each of the positions or each of the areas in the virtual game world. Further, such data may be set for some of the positions or some of the areas, and for each of the remaining other positions, data for a position, among said some of the positions, adjacent to said each of the remaining other positions may be used, and for each of the remaining other areas, data for an area, among said some of the areas, adjacent to said each of the remaining other areas may be used. Further, for the remaining other positions or the remaining other areas, approximation or interpolation may be used. The “advancing direction” represents, for example, a course direction in a game, such as a race game, for allowing a player object to advance along the course in the virtual game world.
The orientation (attitude) of the character may not necessarily correspond to the advancing direction of the character.
Further, the game program stored in the computer-readable storage medium according to certain example embodiments may cause the computer to further function as follows:
leftward-rightward movement direction determination means (S18) for determining, by using the data used for determining the advancing direction, a leftward-rightward movement direction at the current position of the player object in the virtual game world, the leftward-rightward movement direction representing one of a left direction and a right direction in which the player object moves; leftward-rightward movement instruction detection means for detecting for a leftward-rightward movement instruction inputted by the player using the input device for moving the player object in one of the left direction and the right direction; and
leftward-rightward movement control means (S22, S28, S30) for moving or accelerating, in accordance with the leftward-rightward movement instruction from the player having been detected by the leftward-rightward movement instruction detection means, the player object in the leftward-rightward movement direction having been determined by the leftward-rightward movement direction determination means.
Further, the data used for determining the advancing direction may contain coordinate values (60) of a plurality of control points, in the virtual game world, which are arranged in sequence. The advancing direction determination means may determine the advancing direction in accordance with at least a first vector from a first control point which is nearest to the current position of the player object among the plurality of control points to a second control point, among the plurality of control points, which immediately precedes or immediately follows, in the sequence, the first control point.
Further, the advancing direction determination means may determine the advancing direction by using a second vector from the second control point to a third control point, among the plurality of control points, immediately preceding or immediately following the second control point in the sequence.
Here, the control points represent data which are arranged in sequence starting with the control point nearest to the position of the player object in the virtual game world at a predetermined time (for example, a time at which a game starts or a time at which a predetermined condition is satisfied). When the control points are arranged in sequence of a first control point (the control point nearest to the position of the player object at the predetermined time), a second control point, a third control point, . . . , the second control point follows the first control point in the sequence.
Furthermore, a control point which is first in the sequence may be nearest, among the plurality of control points, to a point (start point) at which the player object is positioned in the virtual game world when a game is started, and the advancing direction determination means may determine the advancing direction by using a vector obtained based on at least two vectors including the first vector from the first control point to the second control point immediately following the first control point in the sequence, and a second vector from the second control point to a third control point immediately following the second control point in the sequence.
Here, the advancing direction determination means may determine, as the advancing direction, a vector obtained as an average (or weighted average) of the first vector and the second vector. Further, another vector (a third vector from the third control point to a fourth control point immediately following the third control point in the sequence) may be used.
Moreover, a fourth vector from the first control point to a fifth control point immediately preceding the first control point in the sequence may be used.
Further, a course on which the player object is allowed to move is set in the virtual game world, and the plurality of control points may be set on the course.
Moreover, the display control means may generate, by using a virtual camera set in the virtual game world, a game image including the player object, and the game program stored in the computer-readable storage medium according to certain example embodiments causes the computer to further function as follows,
virtual camera control means (S34) for determining, in accordance with the advancing direction at a point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance, a direction in which the virtual camera is oriented so as to pick up an image.
“A predetermined distance” may not be necessarily “constant”, and may be changed each time, for example, the course is changed or each time an area set in the course is changed.
Further, “a point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance” may be, for example, a point obtained by moving forward a position on the forward direction line corresponding to the current position of the player object along the forward direction line by a predetermined distance, or a point obtained by moving, by a predetermined distance (which may be a constant distance, or a distance based on a current movement speed), a position on the forward direction line corresponding to the current position of the player object in the advancing direction in which the player object is currently advancing or the moving direction in which the player object is currently moving. “The advancing direction at a point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance” is obtained by subjecting, to a similar process performed by the advancing direction determination means, the aforementioned “point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance”.
Further, the game apparatus may include a first operation section (6R) and a second operation section (6L), and the advance instruction detection means may detect that the first operation section and the second operation section are alternately operated, and the leftward-rightward movement instruction detection means may detect that one of the first operation section and the second operation section is solely operated.
Here, the advance instruction detection means detects that the first operation section and the second operation section are alternately operated. On the other hand, the leftward-rightward movement instruction detection means detects that one of the first operation section and the second operation section is solely operated (“solely” is used for a case where one of the first and the second operation sections is operated one time or one of the first and the second operation sections is continuously operated). For example, operation histories of the first operation section and the second operation section are stored in a memory of the game apparatus (when a plurality of the operation histories are stored, the operation histories are stored in orderly sequence). When the first operation section is operated (or each time the first operation section is operated), whether the first operation section has been operated for an immediately preceding time or the second operation section has been operated for an immediately preceding time is determined, and when the first operation section has been operated for the immediately preceding time, it is determined that the first operation section is solely operated, and when the second operation section has been operated for the immediately preceding time, it is determined that the first operation section and the second operation are alternately operated. On the other hand, when the second operation section is operated, whether the first operation section has been operated for an immediately preceding time or the second operation section has been operated for an immediately preceding time is determined, and when the second operation section has been operated for the immediately preceding time, it is determined that the second operation section is solely operated, and when the first operation section has been operated for the immediately preceding time, it is determined that the first operation section and the second operation section are alternately operated. When the first operation section and the second operation section are not operated for a predetermined time period, the operation history information having been stored may be cleared. In this case, an operation performed for the first time after the operation history information has been cleared may be determined as a start of a new series of operations. When the first operation section or the second operation section is operated at a start of a series of operations, the player object may be moved forward, the player object may be moved in the right or left direction, or the player object may not be moved. Further, when the first operation section is continuously operated three or more times, it may be determined that the first operation section is solely operated. The same can be said for the second operation section. Furthermore, when the first operation section and the second operation section are alternately and continuously operated three or more times, it may be determined that the first operation section and the second operation section are alternately operated. Moreover, when another operation section (a third operation section) is provided in addition to the first operation section and the second operation section, the determination may be made regardless of the third operation section having been operated or the determination may be made in consideration the third operation section having been operated. For example, the first operation section, the third operation section, and the second operation section are operated in order, respectively. In this case, when the determination is made regardless of the third operation section having been operated, it is determined that the first operation section and the second operation section are alternately operated, and when the determination is made in consideration of the third operation section having been operated, the first operation section and the second operation section are not alternately operated.
Further, another computer-readable storage medium according to certain example embodiments has stored thereon a game program for moving a player object in a virtual game world in accordance with an operation performed by a player. The game program causes a computer (31) of a game apparatus (3) to function as follows:
display control means (S36) for displaying the player object on a screen of a display device (2);
leftward-rightward movement direction determination means (S18) for determining, by using data (43) used for determining a leftward-rightward movement direction of the player object set in the virtual game world, the leftward-rightward movement direction at a current position of the player object in the virtual game world, the leftward-rightward movement direction representing one of a left direction and a right direction in which the player object moves;
leftward-rightward movement instruction detection means for detecting for a leftward-rightward movement instruction inputted by the player using an input device (6) for moving the player object in one of the left direction and the right direction; and leftward-rightward movement control means (S22, S28, S30) for moving or accelerating, in accordance with the leftward-rightward movement instruction from the player having been detected by the leftward-rightward movement instruction detection means, the player object in the leftward-rightward movement direction having been determined by the leftward-rightward movement direction determination means.
Here, the “data used for determining a leftward-rightward movement direction” is predetermined data for determining, in the virtual game world, the leftward-rightward movement direction at a position or an area in the virtual game world. The “data used for determining a leftward-rightward movement direction” may be direction data (direction vector) representing a direction in the virtual game world, a plural pieces of positional data representing a plurality of positions associated with each other in the virtual game world (in this case, the plurality of positions represented by the plural pieces of positional data are connected to each other so as to represent a direction), or a predetermined equation for determining the direction vector. Further, the “data used for determining a leftward-rightward movement direction” may be data representing the advancing direction. In this case, the leftward-rightward movement direction determination means determines the leftward-rightward movement direction based on the data representing the advancing direction. For example, the “leftward-rightward movement direction” represents a left-right direction relative to the course direction in a game, such as a race game, for allowing a player object to advance along the course in the virtual game world. The “leftward-rightward movement direction” is typically a direction perpendicular to the course direction. Further, the “leftward-rightward movement direction” may form a predetermined angle (excluding zero degree) with the course direction. Preferably, the leftward movement direction and the rightward movement direction may be symmetrical with respect to the course direction, or the leftward movement direction and the rightward movement direction may be aligned in straight line.
The other computer-readable storage medium according to certain example embodiments has stored thereon a game program for moving a player object in a virtual game world in accordance with an operation performed by a player. The game program causes a computer (31) of a game apparatus (3) to function as follows:
display control means (S36) for displaying the player object on a screen of a display device (2);
orthogonal movement direction determination means (S18) for determining, by using data (43) used for determining an orthogonal movement direction of the player object set in the virtual game world, the orthogonal movement direction at a current position of the player object in the virtual game world, the orthogonal movement direction representing a direction orthogonal to an advancing direction representing a direction in which the player object advances;
orthogonal movement instruction detection means for detecting for an orthogonal movement instruction inputted by the player using an input device (6) for moving the player object in the orthogonal movement direction; and
orthogonal movement control means (S22, S28, S30) for moving or accelerating, in accordance with the orthogonal movement instruction from the player having been detected by the orthogonal movement instruction detection means, the player object in the orthogonal movement direction having been determined by the orthogonal movement direction determination means.
Here, the “orthogonal movement direction” represents a direction orthogonal to the advancing direction (for example, the course direction). For example, the “orthogonal movement direction” may be the left-right direction relative to the advancing direction, or may be the upward-downward direction relative to the advancing direction.
A game apparatus according to certain example embodiments executes a game for moving a player object in a virtual game world in accordance with an operation performed by a player, and comprises the following means:
display control means (31, S36) for displaying the player object on a screen of a display device (2);
advancing direction determination means (31, S18) for determining, by using data (43) used for determining an advancing direction of the player object set in the virtual game world, the advancing direction at a current position of the player object in the virtual game world, the advancing direction representing a direction in which the player object advances;
advance instruction detection means (31) for detecting for an advance instruction inputted by the player using an input device (6) for advancing the player object; and
advancing movement control means (31, S20, S28, S30) for moving or accelerating, in accordance with the advance instruction from the player having been detected by the advance instruction detection means, the player object in the advancing direction having been determined by the advancing direction determination means.
Another game apparatus according to certain example embodiments executes a game for moving a player object in a virtual game world in accordance with an operation performed by a player, and comprises the following means:
display control means (31, S36) for displaying the player object on a screen of a display device (2);
leftward-rightward movement direction determination means (31, S18) for determining, by using data (43) used for determining a leftward-rightward movement direction of the player object set in the virtual game world, the leftward-rightward movement direction at a current position of the player object in the virtual game world, the leftward-rightward movement direction representing one of a left direction and a right direction in which the player object moves; and
leftward-rightward movement instruction detection means (31) for detecting for a leftward-rightward movement instruction inputted by the player using an input device (6) for moving the player object in one of the left direction and the right direction; and
leftward-rightward movement control means (31, S22, S28, S30) for moving or accelerating, in accordance with the leftward-rightward movement instruction from the player having been detected by the leftward-rightward movement instruction detection means, the player object in the leftward-rightward movement direction having been determined by the leftward-rightward movement direction determination means.
The other game apparatus according to certain example embodiments executes a game for moving a player object in a virtual game world in accordance with an operation performed by a player, and comprises the following means:
display control means (31, S36) for displaying the player object on a screen of a display device (2);
orthogonal movement direction determination means (31, S18) for determining, by using data (43) used for determining an orthogonal movement direction of the player object set in the virtual game world, the orthogonal movement direction at a current position of the player object in the virtual game world, the orthogonal movement direction representing a direction orthogonal to an advancing direction representing a direction in which the player object advances;
orthogonal movement instruction detection means (31) for detecting for an orthogonal movement instruction inputted by the player using an input device (6) for moving the player object in the orthogonal movement direction; and
orthogonal movement control means (31, S22, S28, S30) for moving or accelerating, in accordance with the orthogonal movement instruction from the player having been detected by the orthogonal movement instruction detection means, the player object in the orthogonal movement direction having been determined by the orthogonal movement direction determination means.
According to certain example embodiments, it is possible to subsidiarily determine a moving direction of an object operated by a player.
These and other objects, features, aspects and advantages of certain example embodiments will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.